package com.hzsk.lisence.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description :
 * @Date : 2024/8/15
 * @Author : ChenJin
 * @Version : v1.0.0
 **/
@Getter
@AllArgsConstructor
public enum ProdTypeEnum {

    Lathe("Lathe","车床"),

    MillingMachine("MillingMachine","铣床"),

    GrindingMachine("GrindingMachine","磨床"),

    GlassMachine("GlassMachine","玻璃机"),

    FiveAxis("Five-Axis","五轴"),

    FiveAxisTurnMillingCombination("Five-AxisTurnMillingCombination","五轴车铣复合"),

    TurningCenter("TurningCenter","车削中心"),

    Laser("Laser","激光"),

    PolishingMachine("PolishingMachine","抛光机");

    private final String code;

    private final String name;
    
    public static String getNameByCode(String code){
        for (ProdTypeEnum prodTypeEnum:ProdTypeEnum.values()){
            if (prodTypeEnum.getCode().equals(code)){
                return prodTypeEnum.getName();
            }
        }
        return null;
    }

}
